/****************************************************************
The class SingleVent takes the responsibility to maintain the output of NCUC
model whose sill is "ZERO".  That is the single vent.
The function for checking the range of the vent coefficient is added.
Author: Chun-Ming Wang
Date of Modification: 22/10/2007 (dd/mm/yyyy)
****************************************************************/
#pragma once
#ifndef _SingleVent
#define _SingleVent
#include "Vent.h"

class SingleVent: public Vent
{
public:
	// constructors
	SingleVent();
	explicit SingleVent(const double &value);
	SingleVent(const SingleVent &rhs);
	// destructor
	virtual ~SingleVent();
	// assignment operator
	SingleVent& operator=(const SingleVent &rhs);
	// access function
	const double& VentCoe() const;
	void VentCoe(const double &value);
	// calculate quantities of the output according to the Sill of NCU
	//virtual double output(const double &SillNcu);
	virtual SingleVent* clone() const;
	// chcek if the coefficient of the vent falls in the proper range
	// 0<=VentCoe <=1
	bool check() const;
	// if the coefficient of the vent falls in the inappropriate range, stop the program.
	void validate() const;
protected:
	// calculate the output of the single vent
	// This behavior of this function depends on the type of the vent
	virtual double calc(const double &SillNCU) const;
private:
    double m_VentCoe; // Vent coefficient
};
#endif